package com.qiaofang.applet.service.other.service;

import com.alibaba.fastjson.JSONObject;
import com.qiaofang.applet.common.base.BaseService;
import com.qiaofang.applet.service.other.domain.Corporation;
import com.qiaofang.applet.service.other.domain.EmployeeLabel;
import com.qiaofang.applet.service.other.domain.FirsthandRules;
import com.qiaofang.applet.service.other.domain.PropertyRules;
import com.qiaofang.applet.service.other.service.dto.CorporationReportDto;
import com.qiaofang.applet.service.other.service.dto.SearchIncludeQueryDto;
import com.qiaofang.applet.service.other.service.dto.WebsiteIncludeInfoDto;
import com.qiaofang.applet.service.other.service.dto.WebsiteIncludeInfoReqDto;
import com.qiaofang.applet.service.property.service.dto.CommerceAcademyDto;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by IDEA.
 *
 * @auther Zym.
 * @company qiaofang
 * @date 2020/9/12 11:35
 */
public interface CorporationService extends BaseService<Corporation, String> {
    /**
     * 保存集团信息
     * @param corporation
     * @return
     */
    String saveCorporation(Corporation corporation);

    /**
     * 通过id移除集团
     * @param id
     * @return
     */
    boolean removeCorporation(String id);

    /**
     * 根据集团code查询集团信息
     * @param corporationCode
     * @return
     */
    Corporation getCorporationByCorporationCode(String corporationCode);

    /**
     * 初始化集团小程序端隐私协议
     * @param corporation
     */
    void initCorporationPrivacyAgreement(Corporation corporation);

    /**
     * 初始化集团官网隐私协议
     * @param corporation
     */
    void initCorporationPCPrivacyAgreement(Corporation corporation);

    /**
     * 获取二手房上/下架规则
     * @param corporationCode
     * @return
     */
    PropertyRules getPropertyRules(String corporationCode);

    /**
     * 获取二手房上/下架规则
     * @param corporationCode
     * @return
     */
    FirsthandRules getFirsthandRules(String corporationCode);

    /**
     * 保存二手房上/下架规则
     * @param corporationCode
     * @param propertyRules
     * @return
     */
    void updatePropertyRules(String corporationCode, PropertyRules propertyRules);

    /**
     * 保存二手房上/下架规则
     * @param corporationCode
     * @param firsthandRules
     * @return
     */
    void updateFirsthandRules(String corporationCode, FirsthandRules firsthandRules);

    /**
     * 增量给所有集团添加迭代的默认初始值  dict init.json
     */
    void incrementAddToDict();

    /**
     * 获取商学院跳转信息
     * @return
     */
    CommerceAcademyDto getCommerceAcademyConfig();

    /**
     * 经纪人自动回复规则
     * @param corporationCode
     * @return
     */
    String getEmployeeReply(String corporationCode);

    /**
     * 更新经纪人自动回复规则
     * @param corporationCode
     * @param params
     */
    void updateEmployeeReply(String corporationCode,String params);

    /**
     * 获取聊天自动回复内容
     * @param employeeUniqueUuid
     * @return
     */
    String getAutoEmployeeReply(String employeeUniqueUuid, String memberId);

    /**
     * 获取跳转巧克力小程序路
     * @param params
     * @return
     */
    JSONObject getMiniProgramPath(Map<String, Object> params, String url, String appId, String appKey);

    /**
     * 获取微信服务通知模板
     * @return
     */
    String getServerTemplateId();

    /**
     * 获取当前集团下经纪人标签筛选条件
     * @param corporationCode
     * @return
     */
    List<EmployeeLabel> getEmployeeLabelList(String corporationCode);

    /**
     * 获取网站收录信息
     * @param reqDto
     * @return
     */
    WebsiteIncludeInfoDto getWebsiteIncludeInfo(WebsiteIncludeInfoReqDto reqDto);

    /**
     * 获取所有百度收录url
     * @param queryDto
     * @return
     */
    Set<String> getSeoUrlSet(SearchIncludeQueryDto queryDto);


    /**
     * 获取集团数据统计
     * @return
     */
    List<CorporationReportDto> getCorporationReportList();
}
